using com.google.zxing.qrcode;
using MicroMsg.UI.Util;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
namespace MicroMsg.UI.Page
{
	public class MakeBarCode : BasePage
	{
		private QRCodeWriter _writer;
		internal Grid LayoutRoot;
		internal Image imgBarCode;
		internal TextBox txtInBarCodeContent;
		internal Button btnMakeBarCode;
		private bool _contentLoaded;
		public MakeBarCode()
		{
			this.InitializeComponent();
		}
		private void btnMakeBarCode_Click(object sender, RoutedEventArgs e)
		{
			if (!string.IsNullOrEmpty(this.txtInBarCodeContent.get_Text()))
			{
				WriteableBitmap writeableBitmap = BarCodeMakerUtil.MakeBarCode(this.txtInBarCodeContent.get_Text());
				if (writeableBitmap != null)
				{
					this.imgBarCode.set_Source(writeableBitmap);
				}
			}
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/BarCodeTool/MakeBarCode.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.imgBarCode = (Image)base.FindName("imgBarCode");
			this.txtInBarCodeContent = (TextBox)base.FindName("txtInBarCodeContent");
			this.btnMakeBarCode = (Button)base.FindName("btnMakeBarCode");
		}
	}
}
